<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBannersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('banners', function (Blueprint $table) {
          $table->charset = 'utf8';
          $table->collation = 'utf8_general_ci';
          $table->increments('id',11)->comment("主键id");
          $table->string('name',255)->nullable(true)->comment("轮播图名称");
          $table->string('img_url',255)->nullable(true)->comment("轮播图路径");
          $table->string('go_url',255)->nullable(true)->comment("轮播图跳转路径");
          $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('banners');
    }
}
